<?php

/**
 * Class Client
 * @property $rue
 * @property $codePostal
 * @property $ville
 */
class Client extends Membre {

// <editor-fold defaultstate="collapsed" desc="Champs">
   protected $_rue = "inconnu";
   protected $_codePostal = "inconnu";
   protected $_ville = "inconnu";
   protected static $_nbInstance = 0;

// </editor-fold>
// <editor-fold defaultstate="collapsed" desc="Propriétés">
   public function __get($propriete) {
      switch ($propriete) {
         case "rue": return $this->_rue;
            break;
         case "codePostal": return $this->_codePostal;
            break;
         case "ville": return $this->_ville;
            break;
         default: return parent::__get($propriete);
      }
   }

   public function __set($propriete, $value) {
      switch ($propriete) {
         case "rue":$this->_rue = $value;
            break;
         case "codePostal":$this->_codePostal = $value;
            break;
         case "ville":$this->_ville = $value;
            break;
         default: parent::__set($propriete, $value);
      }
   }

// </editor-fold>
// <editor-fold defaultstate="collapsed" desc="Constructeur">
   public function Client($login, $pass, $ville, $rue = null, $codePostal = null, $nom = null, $prenom = null, $id = null) {
      parent::Membre($login, $pass, $nom, $prenom, $id);
      if ($rue != null) {
      }
      if ($codePostal != null) {
         $this->codePostal = $codePostal;
      }
      $this->ville = $ville;
      self::$_nbInstance++;
   }

// </editor-fold>
// <editor-fold defaultstate="collapsed" desc="Méthodes">
   public function __tostring(){
            return parent::__tostring() . '-' . $this->ville;
   }

// </editor-fold>
}
?>
